/*
package com.link.base.core.baidu;

import com.baidu.ueditor.ActionEnter;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.PrintWriter;
import java.io.IOException;

*/
/**
 * 获取Ue富文本编辑器配置
 *//*

@Controller
@RequestMapping("/link/ue")
public class UeditorController {

    */
/**
     * 查询配置文件内容
     *//*

    @RequestMapping(value = "/config1")
    @ResponseBody
    public String getUeCofig1(String action, HttpSession session,
                             HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("application/json");
        String ueditorUrl = request.getSession().getServletContext().getRealPath("/");
        */
/*System.out.println(ueditorUrl);
        ueditorUrl = "http://localhost:8025/share";*//*

        String result = new ActionEnter(request, ueditorUrl).exec();
        ueditorUrl = ueditorUrl.replaceAll("\\\\", "/");
        if (action != null && (action.equals("listfile") || action.equals("listimage"))) {
            return result.replaceAll(ueditorUrl, "");
        }
        return result;
    }

    */
/**
     * 查询配置文件内容
     *//*

    @RequestMapping(value = "/config2")
    public String getUeCofig2(String action, HttpSession session,
                             HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("application/json");
        String ueditorUrl = request.getSession().getServletContext().getRealPath("/");
        String result = new ActionEnter(request, ueditorUrl).exec();
        ueditorUrl = ueditorUrl.replaceAll("\\\\", "/");
        if (action != null && (action.equals("listfile") || action.equals("listimage"))) {
            return result.replaceAll(ueditorUrl, "");
        }
        return result;
    }

    */
/**
     * 查询配置文件内容
     *//*

    @RequestMapping(value = "/config")
    public void getUeCofig(String action, HttpSession session,
                              HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("application/json");
        String ueditorUrl = request.getSession().getServletContext().getRealPath("/");
        String result = new ActionEnter(request, ueditorUrl).exec();
        ueditorUrl = ueditorUrl.replaceAll("\\\\", "/");
        if (action != null && (action.equals("listfile") || action.equals("listimage"))) {
            result =  result.replaceAll(ueditorUrl, "");
        }
        try {
            PrintWriter writer = response.getWriter();
            writer.write(result);
            writer.flush();
            writer.close();
        } catch ( IOException e) {
            e.printStackTrace();
        }
    }
}
*/
